import { objToArray } from "@/utils/utils";

export enum TASK_STATUS {
  UN_START = 0,
  IN_PROGRESS = 1,
  FINISHED = 2
}

export const statusObj = {
  [TASK_STATUS.UN_START]: {
    id: TASK_STATUS.UN_START,
    name: "未开始"
  },
  [TASK_STATUS.IN_PROGRESS]: {
    id: TASK_STATUS.IN_PROGRESS,
    name: "进行中"
  },
  [TASK_STATUS.FINISHED]: {
    id: TASK_STATUS.FINISHED,
    name: "已完成"
  }
};

export const statusList = objToArray(statusObj);

// 工资单位
export enum SALARY_TYPE {
  HOUR = 0,
  DAY = 1,
  MONTH = 2
}
export const salaryTypeObj = {
  [SALARY_TYPE.HOUR]: {
    id: SALARY_TYPE.HOUR,
    name: "小时"
  },
  [SALARY_TYPE.DAY]: {
    id: SALARY_TYPE.DAY,
    name: "每天"
  },
  [SALARY_TYPE.MONTH]: {
    id: SALARY_TYPE.MONTH,
    name: "每月"
  }
};
export const salaryTypeList = objToArray(salaryTypeObj);

export enum ACCEPT_STATUS {
  PENDING = 0,
  ACCEPTED = 1,
  DENY = 2
}

export const acceptStatusObj = {
  [ACCEPT_STATUS.PENDING]: {
    id: ACCEPT_STATUS.PENDING,
    name: "待定"
  },
  [ACCEPT_STATUS.ACCEPTED]: {
    id: ACCEPT_STATUS.ACCEPTED,
    name: "接受"
  },
  [ACCEPT_STATUS.DENY]: {
    id: ACCEPT_STATUS.DENY,
    name: "拒绝"
  }
};
export const acceptStatusList = objToArray(acceptStatusObj);
